﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Atomic.Common;
using Atomic.FriendLinks.Entities;

namespace Atomic.FriendLinks
{
    /// <summary>
    /// 友情链接业务接口
    /// </summary>
    public interface ILink : IError
    {
        /// <summary>
        /// 添加新的友情链接
        /// </summary>
        /// <param name="entity">友情链接信息</param>
        /// <returns>是否添加成功</returns>
        bool Add(LinkEntity entity);

        /// <summary>
        /// 删除指定链接
        /// </summary>
        /// <param name="id">链接ID</param>
        /// <returns>是否删除成功</returns>
        bool Remove(int id);

        /// <summary>
        /// 更新友情链接信息
        /// </summary>
        /// <param name="entity">新友情链接信息</param>
        /// <param name="id">要更新的友情链接ID</param>
        /// <returns>是否更新成功</returns>
        bool Update(LinkEntity entity, int id);

        /// <summary>
        /// 获取指定ID的友情链接信息
        /// </summary>
        /// <param name="id">友情链接ID</param>
        /// <returns>友情链接信息</returns>
        LinkEntity Get(int id);

        /// <summary>
        /// 获取所有友情链接
        /// </summary>
        /// <returns>友情链接</returns>
        List<LinkEntity> GetList();
    }
}
